<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
    <meta name="language" content="en"/>
    <link rel="shortcut icon" type="image/x-icon"
          href="<?php echo Yii::app()->request->baseUrl; ?>/themes/front/images/favicon.ico"/>
    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css"
          href="<?php echo Yii::app()->request->baseUrl; ?>/themes/front/css/style.css"/>
    <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
    <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    <script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-41320273-1', '3gstore.vn');
  ga('send', 'pageview');

</script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".search-button").click(function () {
                $('#search-box').toggle();
            });
        });
    </script>
</head>
<body>

<div class="container" id="page">
    <div id="toolbar" style="display: none;">
        <div class="logo">
            <?php echo CHtml::link('<img src="' . Yii::app()->request->baseUrl . '/images/logovtc.jpg"/>', 'http://m.vtc.vn'); ?>
        </div>
        <?php $this->widget('application.extensions.front_toolbar.front_toolbar'); ?>
    </div>
    <div id="header">
        <div class="hleft">
        </div>
        <?php echo CHtml::link('<img src="' . Yii::app()->request->baseUrl . '/images/logo_new.png"/>', array('/site/index')); ?>
        <div class="hright">
        </div>
        <div class="cake-button">
            <img src="<?php Yii::app()->request->baseUrl ?>/images/cake.png" alt="3ghot menu">
        </div>
        <div class="search-button">
            <img src="<?php Yii::app()->request->baseUrl ?>/images/search.png" alt="3ghot search">
        </div>
        <div class="clear"></div>


    </div>

    <div id='search-box' style="display: none">
        <?php $this->widget('ext.search'); ?>
    </div>
    <!-- header -->
    <div id="mainmenu">
        <?php
        $this->widget('zii.widgets.CMenu', array(
            'items' => array(
                array('label' => '<img src="' . Yii::app()->request->baseUrl . '/images/icon_tv.png"/><span>Xem TIVI</span>', 'url' => array('tv/index'), array('title' => 'Xem Tivi')),
                array('label' => '<img src="' . Yii::app()->request->baseUrl . '/images/icon_film.png"/><span>Xem Phim</span>', 'url' => array('film/index'), array('title' => 'Xem Phim')),
                array('label' => '<img src="' . Yii::app()->request->baseUrl . '/images/icon_clip.png"/><span>Xem Clip</span>', 'url' => array('clip/index'), array('title' => 'Xem Clip')),
                array('label' => '<img src="' . Yii::app()->request->baseUrl . '/images/icon_clip.png"/><span>Tài khoản</span>', 'url' => array('member/about'), array('title' => 'Tài khoản')),
            ),
            'encodeLabel' => false,
        )); ?>
    </div>

    <div id="search-box" style="display: none;">
        <?php
        $this->widget('ext.search');
        ?>
    </div>
    <?php echo $content; ?>

    <div class="clear"></div>
    <div id="footer">
        <a href="<?php Yii::app()->createUrl('site/index') ?>">Copyright &copy; <?php echo '3GSTORE.VN'; ?></a>
        <div class="hright">
        </div>
        <div class="hleft">
        </div>
    </div>
    <!-- footer -->

</div>
<!-- page -->
<script>

    var page = document.getElementById('page'),
        ua = navigator.userAgent,
        iphone = ~ua.indexOf('iPhone') || ~ua.indexOf('iPod'),
        ipad = ~ua.indexOf('iPad'),
        ios = iphone || ipad,
    // Detect if this is running as a fullscreen app from the homescreen
        fullscreen = window.navigator.standalone,
        android = ~ua.indexOf('Android'),
        lastWidth = 0;

    if (android) {
        // Android's browser adds the scroll position to the innerHeight, just to
        // make this really fucking difficult. Thus, once we are scrolled, the
        // page height value needs to be corrected in case the page is loaded
        // when already scrolled down. The pageYOffset is of no use, since it always
        // returns 0 while the address bar is displayed.
        window.onscroll = function () {
            page.style.height = window.innerHeight + 'px';
        }
    }
    var setupScroll = window.onload = function () {
        // Start out by adding the height of the location bar to the width, so that
        // we can scroll past it
        if (ios) {
            // iOS reliably returns the innerWindow size for documentElement.clientHeight
            // but window.innerHeight is sometimes the wrong value after rotating
            // the orientation
            var height = document.documentElement.clientHeight;
            // Only add extra padding to the height on iphone / ipod, since the ipad
            // browser doesn't scroll off the location bar.
            if (iphone && !fullscreen) height += 60;
            page.style.height = height + 'px';
        } else if (android) {
            // The stock Android browser has a location bar height of 56 pixels, but
            // this very likely could be broken in other Android browsers.
            page.style.height = (window.innerHeight + 56) + 'px'
        }
        // Scroll after a timeout, since iOS will scroll to the top of the page
        // after it fires the onload event
        setTimeout(scrollTo, 0, 0, 1);
    };
    (window.onresize = function () {
        var pageWidth = page.offsetWidth;
        // Android doesn't support orientation change, so check for when the width
        // changes to figure out when the orientation changes
        if (lastWidth == pageWidth) return;
        lastWidth = pageWidth;
        setupScroll();
    })();
</script>
</body>
</html>